package ru.surfstudio.graduate.data;

import java.io.Serializable;
import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class Channel implements Serializable {

	private static final long serialVersionUID = 1L;
	
	public static final String URL_FIELD_NAME = "url";
	
	public static final String MARK_FIELD_NAME = "mark";
	
	@DatabaseField(generatedId = true)
	private Integer id;
	
	@DatabaseField
	private String name;
	
	@DatabaseField(columnName=URL_FIELD_NAME)
	private String url;
	
	@DatabaseField
	private Date updateDate;
	
	@DatabaseField
	private Integer count = 0;
	
	@DatabaseField(columnName=MARK_FIELD_NAME)
	private Mark mark = Mark.NONE;
	
/*	@ForeignCollectionField(eager = false)
	private ForeignCollection<Feed> feeds;*/

	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Mark getMark() {
		return mark;
	}

	public void setMark(Mark mark) {
		this.mark = mark;
	}


	public enum Mark {
		FAVORITE, ALL, NONE
	}

}
